#!/bin/bash
set -ex
if [ ! -e $GOPATH/src/go.etcd.io/etcd ]; then
    go get -v github.com/etcd-io/etcd
    if [ ! -e $GOPATH/src/go.etcd.io/ ];then 
        mkdir $GOPATH/src/go.etcd.io/    
    fi
    ln -s  $GOPATH/src/github.com/etcd-io/etcd $GOPATH/src/go.etcd.io/etcd
fi

$GOPATH/src/github.com/etcd-io/etcd/build

docker build -t "yang/etcd:latest" .

